#
# Copyright (C) 2008-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=gobinet
PKG_RELEASE:=1

include $(INCLUDE_DIR)/package.mk

define KernelPackage/gobinet
  SUBMENU:=Other modules
  TITLE:=gobinet
  DEPENDS:=kmod-usb-net
  FILES:=$(PKG_BUILD_DIR)/gobinet.ko
  AUTOLOAD:=$(call AutoLoad,30,gobinet,1)
endef

MAKE_OPTS:= \
	ARCH="$(LINUX_KARCH)" \
	CROSS_COMPILE="$(TARGET_CROSS)" \
	SUBDIRS="$(PKG_BUILD_DIR)" \
	EXTRA_CFLAGS="$(EXTRA_CFLAGS)"

define Build/Compile
	$(MAKE) -C "$(LINUX_DIR)" \
		$(MAKE_OPTS) \
		modules
endef

$(eval $(call KernelPackage,gobinet))
